#include "head.h"
/* Usage: */

int initStatus(status_t *status){
    status->exit_flag = false;

    status->pthread_num = THNUM;

    pthread_mutex_init(&status->lock, NULL);

    pthread_cond_init(&status->cond, NULL);

    status->net_q = createQueue();

    for(int i=0; i<status->pthread_num; i++){
        pthread_create(&status->thds[i], NULL, thread_main, (void*)status);
    }
    return 0;
}
